<template>
  <div class="row">
    <div class="box" v-for="(item, index) in list">
      {{ index + 1 }}
    </div>
  </div>
  <div>
    <button @click="add">添加</button>
  </div>
</template>
<script>
import '@/libs/jquery-ui-1.14.1.custom-draggable-sortable/jquery-ui.js'
export default {
  data() {
    return {
      list: new Array(5).fill(1)
    }
  },
  methods: {
    add() {
      console.log(`helloworld`)
      //15 + 15 + 24 + 24 + 20
    }
  },
  mounted() {
    console.log(`helloworld`)
    $('.row').sortable()
  }
}
</script>
<style type="text/css">
.row {
  padding: 20px;
}
.box {
  width: 100px;
  height: 100px;
  border: 1px solid #000;
}
</style>
